package com.robcity.platform.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description
 * @Author zhangsong
 * @Date 2024/8/10
 **/
@Getter
@AllArgsConstructor
public enum TaskTypeEnum {

    PATROL("1", "巡逻"),

    MONITOR("2", "监控");

    private final String code;

    private final String desc;
    public static TaskTypeEnum getByCode(String code) {
        for (TaskTypeEnum taskTypeEnum : TaskTypeEnum.values()) {
            if (taskTypeEnum.getCode().equals(code)) {
                return taskTypeEnum;
            }
        }
        return null;
    }

}
